package zmm

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/zmm/model/entity"
)

type ZmmMemberListReq struct {
	g.Meta  `path:"/zmm_member/list" tags:"会员管理" method:"get" summary:"会员列表" security:"bearer"`
	Name    string `p:"name"`
	Status  string `p:"status"`
	Contact string `p:"contact"`
	commonApi.PageReq
}

type ZmmMemberListRes struct {
	g.Meta    `mime:"application/json"`
	ZmmMember []*entity.ZmmMember `json:"list"`
	commonApi.ListRes
}

type ZmmMemberOpQueryListReq struct {
	g.Meta  `path:"/zmm_member/op_query/list" tags:"会员管理" method:"get" summary:"会员下拉列表" security:"bearer"`
	OpQuery string `p:"op_query"`
}

type ZmmMemberEditReq struct {
	g.Meta         `path:"/zmm_member/edit" tags:"会员管理" method:"post" summary:"会员修改" security:"bearer"`
	ID             uint64 `p:"id" v:"integer#ID必须为数字" summary:"ID" d:"0"`
	Name           string `p:"name" v:"required#请输入员工名称" d:""`
	Contact        string `p:"contact" v:"required#请输入联系方式" d:""`
	Remark         string `p:"remark" d:""`
	Status         uint8  `p:"status" v:"required|integer|in:0,1#请选择状态|状态类型有误|状态格式有误" d:"1"`
	JoinEmployeeId string `p:"join_employee_id"  v:"integer#员工选择信息有误" d:"0"`
}
type ZmmMemberEditRes struct {
	g.Meta `mime:"application/json"`
	ID     uint64 `json:"id"`
}

type ZmmMemberDelReq struct {
	g.Meta `path:"/zmm_member/delete" tags:"会员管理" method:"delete" summary:"会员删除" security:"bearer"`
	ID     uint64 `p:"id" v:"required|integer#ID参数错误|ID必须为数字" summary:"ID" d:"0"`
}
type ZmmMemberDelRes struct{}

type ZmmMemberRechargeReq struct {
	g.Meta        `path:"/zmm_member/recharge" tags:"会员管理" method:"post" summary:"会员充值" security:"bearer"`
	ID            uint64  `p:"id" v:"integer#ID必须为数字" summary:"ID" d:"0"`
	RechargeMoney float64 `p:"recharge_money" v:"required|float#请输入充值金额|充值金额格式错误" d:"0"`
	ShopId        uint64  `p:"shop_id" v:"integer#店铺参数错误" summary:"SHOPID" d:"0"`
	Remark        string  `p:"remark" d:""`
}
type ZmmMemberRechargeRes struct {
	g.Meta `mime:"application/json"`
}
